import time
import openpyxl
import pandas as pd
import random

'''
 CA店铺的listing上传表格生成器
'''

'''
输出表结构
'''
out_col_names = [
	'SKU', 'Product Name', 'Product ID Type', 'Product ID', 'Description', 'Key Features', 'Product Tax Code', 'Brand', 'Manufacturer', 'Manufacturer Part Number', 'Multipack Quantity',
	'Count Per Pack', 'Total Count', 'Model Number', 'Product Id Update', 'SKU Update', 'Main Image URL', 'Additional Image URL', 'MSRP', 'Price', 'Minimum Advertised Price',
	'Site Start Date', 'Site End Date', 'Must Ship Alone', 'Shipping Override - isShippingAllowed', 'Shipping Override - Ship Method MP', 'Shipping Override - Ship Region',
	'Shipping Override-Ship Price', 'Color', 'Color Category', 'Pattern', 'Material', 'Gender', 'Age Group', 'Clothing Size Group', 'Clothing Size', 'Is Set', 'Measure', 'Unit',
	'Ships in Original Packaging', 'Variant Group ID', 'Variant Attribute Names', 'Is Primary Variant', 'Swatch Variant Attribute', 'Swatch Image URL', 'Small Parts Warning Code',
	'Country of Origin - Textiles', 'Contained Battery Type', 'Has Warranty', 'Warranty URL', 'Warranty Text', 'Clothing Top Style', 'Dress Shirt Size', 'Sleeve Style', 'Sleeve Length Style',
	'Clothing Neck Style', 'Collar Style', 'Jacket Style', 'Suit Breasting Style', 'Sweater Style', 'Scarf Style', 'Upper Body Strap Configuration', 'Hat Size', 'Hat Style', 'Bra Style',
	'Bra Size', 'Measure', 'Unit', 'Waist Rise', 'Waist Style', 'Measure', 'Unit', 'Panty Size', 'Measure', 'Unit', 'Leg Opening Cut', 'Pant Leg Cut', 'Jean Style', 'Jean Wash',
	'Jean Finish', 'Pant Size', 'Pant Fit', 'Pant Style', 'Belt Style', 'Belt Buckle Style', 'Underpant/Swim Bottom Style', 'Shorts Style', 'Skirt Style', 'Skirt Length Style',
	'Hosiery Style', 'Sheerness', 'Underwear Style', 'Sock Size', 'Sock Style', 'Sock Rise', 'Fabric Material Name', 'Fabric Material Percentage', 'Fabric Care Instructions',
	'Accent Color', 'Clothing Weight', 'Clothing Style', 'Clothing Fit', 'Clothing Cut', 'Clothing Length Style', 'Closure Type', 'Swimsuit Style', 'Dress Style', 'GOTS Certification',
	'Theme', 'Character', 'Brand License', 'Sports League', 'Sports Team', 'Occasion', 'Activity', 'Sport', 'Season', 'Weather', 'Is Maternity', 'Academic Institution', 'Athlete',
	'Autographed by', 'Measure', 'Unit', 'Bra Cup Size', 'Measure', 'Unit', 'Measure', 'Unit', 'Measure', 'Unit', 'Is Made From Recycled Material', 'Recycled Material',
	'Percentage of Recycled Material', 'Additional Features', 'Keywords', 'Country of Origin', 'HS Code', 'Hazardous Transportation Indicator'
]

imgcol_names = ['Main Image URL', 
    'Additional Image URL (+)', 'Additional Image URL 1 (+)', 'Additional Image URL 2 (+)',
    'Additional Image URL 3 (+)', 'Additional Image URL 4 (+)', 'Additional Image URL 5 (+)'
]

def gen(brand, src_data):
	return pd.DataFrame(columns=out_col_names)